package Exceptions;

 
 

import java.math.BigDecimal;

import squarePackage.Square;

import be.kuleuven.cs.som.annotate.Basic;
import be.kuleuven.cs.som.annotate.Immutable;


/**
 * A class that signals exceptions for invalid humiditys for a square
 * Every exception contains the illegal humidity and the square
 * 
 * @author An
 *
 */

public class IllegalHumidityException extends RuntimeException{

	/**
	 * The default serial number of the exception
	 *///als dit private...wegdoen dan via klikken op waarschuwing publc class...automatic generaten
		//van serial number

	private static final long serialVersionUID = 1L;
	
	

	/**
	 *
	 * @param	humidity
	 * 			the humidity of the new illegal humidity exception
	 * @param 	square
	 * 			the square for the illegal humidity exception
	 * @post	The humidity of the new illegal humidity exception is the given humidity
	 * 			|new.getHumidity() == humidity
	 * @post	The square of the new illegal humidity exception is the given square
	 * 			|new.getSquare() == square
	 */
	public IllegalHumidityException(BigDecimal humidity, Square square){
		this.humidity = humidity;
		this.square = square;
	}
	
	/**
	 * 
	 * @return the humidity of the illegal humidity exception
	 */
	@Basic @Immutable
	public BigDecimal gethumidity(){
		return humidity;
	}

	/**
	 * Variable registering the humidity of the illegal humidity exception
	 */
	private final BigDecimal humidity;
	
	/**
	 * @return the square of the illegal humidity exception
	 */
	@Basic @Immutable
	public Square getSquare(){
		return square;
	}
	
	/**
	 * Variable referring the square of the illegal humidity exception
	 */
	private final Square square;
	
}


